nofail SSH Mounting in fstab

The following /etc/fstab entry is placed on your client machine, connecting you to your remote machine using SSH keys:

Note that sshfs will have to be installed on your client in order for this to work. This can be done through your distro's package manager.

sshfs#{REMOTE}@{IP_ADDRESS}:/mnt/{REMOTE_DIR} /mnt/{CLIENT_DIR} fuse ServerAliveInterval=1,reconnect,port={PORT},defaults,_netdev,IdentityFile=/home/{CLIENT}/.ssh/id_rsa,allow_other,nofail 0 0

The port option can be ommited if the default SSH port is used.

The nofail option is important. If you client can't connect for whatever reason, your entire system won't halt due to a boot failure.

reconnect and ServerAliveInterval=1 are also important. These are used to ensure your machine doesn't halt in case the server/remote disconnects while the connection is in use.


Check out these articles...
2024-05-28 21:50:47 VMware Workstation Download Post-Broadcom
2024-02-12 22:08:09 Routing HexChat Through Tor
2024-01-30 22:38:27 Basic Penetration Testing Tips
2024-02-16 20:21:36 Meta Quest 3 Shortcuts
2022-08-22 00:05:08 WSL 2 Setup